package com.atguigu.flink.chapter05.Source;

import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

import java.util.Arrays;

/**
 * TODO
 *
 * @author cjp
 * @version 1.0
 * @date 2021/1/20 10:26
 */
public class Flink02_Source_File {
    public static void main(String[] args) throws Exception {
        // 1. 获取执行环境
        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
        env.setParallelism(1);

        // TODO 从文件读取数据
//        env.readTextFile("input/word.txt")
//        env.readTextFile("hdfs://hadoop1:8020/xx/xx/xx")
//        env.readFile(文件格式, 文件路径)


        env.execute();
    }
}
